<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>缺陷管理 - 工业管道安全巡检系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="bg-gray-100">
    <!-- 顶部导航栏 -->
    <nav class="bg-blue-600 text-white p-4 shadow-lg">
        <div class="flex justify-between items-center">
            <h1 class="text-xl font-bold">缺陷管理</h1>
            <button class="bg-red-500 hover:bg-red-600 px-4 py-2 rounded-lg">
                <i class="fas fa-plus mr-2"></i>新增缺陷
            </button>
        </div>
    </nav>

    <div class="flex">
        <!-- 侧边栏 -->
        <aside class="bg-white w-64 min-h-screen shadow-lg">
            <nav class="p-4">
                <ul class="space-y-2">
                    <li><a href="#" class="flex items-center p-3 text-gray-700 hover:bg-gray-100 rounded-lg">
                        <i class="fas fa-tachometer-alt w-6"></i>
                        <span class="ml-3">主控制台</span>
                    </a></li>
                    <li><a href="#" class="flex items-center p-3 bg-red-50 text-red-600 rounded-lg">
                        <i class="fas fa-exclamation-triangle w-6"></i>
                        <span class="ml-3">缺陷管理</span>
                    </a></li>
                </ul>
            </nav>
        </aside>

        <!-- 主内容区 -->
        <main class="flex-1 p-6">
            <!-- 统计卡片 -->
            <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center">
                        <div class="p-3 bg-red-100 rounded-lg">
                            <i class="fas fa-exclamation-circle text-red-600 text-xl"></i>
                        </div>
                        <div class="ml-4">
                            <p class="text-gray-500 text-sm">紧急缺陷</p>
                            <p class="text-2xl font-bold text-red-600">3</p>
                        </div>
                    </div>
                </div>

                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center">
                        <div class="p-3 bg-yellow-100 rounded-lg">
                            <i class="fas fa-exclamation-triangle text-yellow-600 text-xl"></i>
                        </div>
                        <div class="ml-4">
                            <p class="text-gray-500 text-sm">严重缺陷</p>
                            <p class="text-2xl font-bold text-yellow-600">8</p>
                        </div>
                    </div>
                </div>

                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center">
                        <div class="p-3 bg-blue-100 rounded-lg">
                            <i class="fas fa-info-circle text-blue-600 text-xl"></i>
                        </div>
                        <div class="ml-4">
                            <p class="text-gray-500 text-sm">一般缺陷</p>
                            <p class="text-2xl font-bold text-blue-600">15</p>
                        </div>
                    </div>
                </div>

                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center">
                        <div class="p-3 bg-green-100 rounded-lg">
                            <i class="fas fa-check-circle text-green-600 text-xl"></i>
                        </div>
                        <div class="ml-4">
                            <p class="text-gray-500 text-sm">已处理</p>
                            <p class="text-2xl font-bold text-green-600">142</p>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 工具栏 -->
            <div class="bg-white p-4 rounded-lg shadow mb-6">
                <div class="flex justify-between items-center">
                    <div class="flex space-x-4">
                        <select class="px-4 py-2 border border-gray-300 rounded-lg">
                            <option>全部等级</option>
                            <option>紧急</option>
                            <option>严重</option>
                            <option>一般</option>
                        </select>
                        <select class="px-4 py-2 border border-gray-300 rounded-lg">
                            <option>全部状态</option>
                            <option>待处理</option>
                            <option>处理中</option>
                            <option>已完成</option>
                        </select>
                        <input type="text" placeholder="搜索缺陷..." class="px-4 py-2 border border-gray-300 rounded-lg">
                    </div>
                </div>
            </div>

            <!-- 缺陷列表 -->
            <div class="bg-white rounded-lg shadow">
                <div class="p-4 border-b">
                    <h3 class="text-lg font-semibold">缺陷列表</h3>
                </div>
                <div class="divide-y divide-gray-200">
                    <!-- 紧急缺陷 -->
                    <div class="p-6 border-l-4 border-red-500 bg-red-50">
                        <div class="flex justify-between items-start">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3 mb-2">
                                    <span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded-full">紧急</span>
                                    <span class="text-sm font-medium text-gray-900">DEF-2025-001</span>
                                    <span class="text-sm text-gray-500">发现时间: 2025-01-16 14:30</span>
                                </div>
                                <h4 class="text-lg font-semibold text-gray-900 mb-2">A-001-003里程桩管体泄漏</h4>
                                <p class="text-gray-700 mb-3">发现管体出现明显泄漏，周围土壤有油污，需立即处理防止扩散</p>
                                <div class="grid grid-cols-3 gap-4 text-sm">
                                    <div>
                                        <span class="text-gray-500">发现人员:</span>
                                        <span class="text-gray-900">李巡检员</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">线路位置:</span>
                                        <span class="text-gray-900">输油主干线A-001</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">处理期限:</span>
                                        <span class="text-red-600 font-medium">2小时内</span>
                                    </div>
                                </div>
                            </div>
                            <div class="ml-6 flex flex-col space-y-2">
                                <button class="bg-red-500 text-white px-4 py-2 rounded-lg text-sm hover:bg-red-600">
                                    立即处理
                                </button>
                                <button class="border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50">
                                    查看详情
                                </button>
                            </div>
                        </div>
                        <!-- 图片附件 -->
                        <div class="mt-4">
                            <p class="text-sm text-gray-600 mb-2">现场照片:</p>
                            <div class="flex space-x-2">
                                <img src="https://images.unsplash.com/photo-1581094794329-c8112a89af12?w=100&h=75&fit=crop" 
                                     alt="缺陷照片" class="w-20 h-15 object-cover rounded border">
                                <img src="https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=100&h=75&fit=crop" 
                                     alt="缺陷照片" class="w-20 h-15 object-cover rounded border">
                            </div>
                        </div>
                    </div>

                    <!-- 严重缺陷 -->
                    <div class="p-6 border-l-4 border-yellow-500 bg-yellow-50">
                        <div class="flex justify-between items-start">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3 mb-2">
                                    <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded-full">严重</span>
                                    <span class="text-sm font-medium text-gray-900">DEF-2025-002</span>
                                    <span class="text-sm text-gray-500">发现时间: 2025-01-15 10:15</span>
                                </div>
                                <h4 class="text-lg font-semibold text-gray-900 mb-2">B-002-005里程桩防腐层损坏</h4>
                                <p class="text-gray-700 mb-3">发现防腐层大面积剥落，金属暴露严重，可能导致腐蚀加剧</p>
                                <div class="grid grid-cols-3 gap-4 text-sm">
                                    <div>
                                        <span class="text-gray-500">发现人员:</span>
                                        <span class="text-gray-900">王巡检员</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">线路位置:</span>
                                        <span class="text-gray-900">输油支线B-002</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">处理期限:</span>
                                        <span class="text-yellow-600 font-medium">7天内</span>
                                    </div>
                                </div>
                            </div>
                            <div class="ml-6 flex flex-col space-y-2">
                                <button class="bg-yellow-500 text-white px-4 py-2 rounded-lg text-sm hover:bg-yellow-600">
                                    安排处理
                                </button>
                                <button class="border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50">
                                    查看详情
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- 一般缺陷 -->
                    <div class="p-6 border-l-4 border-blue-500">
                        <div class="flex justify-between items-start">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3 mb-2">
                                    <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">一般</span>
                                    <span class="text-sm font-medium text-gray-900">DEF-2025-003</span>
                                    <span class="text-sm text-gray-500">发现时间: 2025-01-14 16:45</span>
                                </div>
                                <h4 class="text-lg font-semibold text-gray-900 mb-2">C-003-008里程桩标识不清</h4>
                                <p class="text-gray-700 mb-3">里程桩标识牌字迹模糊，需要更换新的标识牌</p>
                                <div class="grid grid-cols-3 gap-4 text-sm">
                                    <div>
                                        <span class="text-gray-500">发现人员:</span>
                                        <span class="text-gray-900">张巡检员</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">线路位置:</span>
                                        <span class="text-gray-900">输油支线C-003</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">处理期限:</span>
                                        <span class="text-blue-600 font-medium">30天内</span>
                                    </div>
                                </div>
                            </div>
                            <div class="ml-6 flex flex-col space-y-2">
                                <button class="bg-blue-500 text-white px-4 py-2 rounded-lg text-sm hover:bg-blue-600">
                                    计划处理
                                </button>
                                <button class="border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50">
                                    查看详情
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- 已处理缺陷 -->
                    <div class="p-6 border-l-4 border-green-500 bg-green-50">
                        <div class="flex justify-between items-start">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3 mb-2">
                                    <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">已完成</span>
                                    <span class="text-sm font-medium text-gray-900">DEF-2025-004</span>
                                    <span class="text-sm text-gray-500">完成时间: 2025-01-13 15:20</span>
                                </div>
                                <h4 class="text-lg font-semibold text-gray-900 mb-2">D-004-002里程桩周围杂草清理</h4>
                                <p class="text-gray-700 mb-3">清理里程桩周围杂草，便于巡检和维护作业</p>
                                <div class="grid grid-cols-3 gap-4 text-sm">
                                    <div>
                                        <span class="text-gray-500">处理人员:</span>
                                        <span class="text-gray-900">刘维护员</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">线路位置:</span>
                                        <span class="text-gray-900">输油支线D-004</span>
                                    </div>
                                    <div>
                                        <span class="text-gray-500">处理时长:</span>
                                        <span class="text-green-600 font-medium">2小时</span>
                                    </div>
                                </div>
                            </div>
                            <div class="ml-6 flex flex-col space-y-2">
                                <button class="bg-gray-100 text-gray-600 px-4 py-2 rounded-lg text-sm cursor-not-allowed">
                                    已完成
                                </button>
                                <button class="border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm hover:bg-gray-50">
                                    查看报告
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
</body>
</html>